package com.hua.controller;

import com.hua.entities.Orders;
import com.hua.entities.R;
import com.hua.service.serviceImpl.OrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController{

    @Autowired
    private OrderServiceImpl orderService;

    @PostMapping("/submit")
    public R<String> paying(@RequestBody Orders orders){
        orderService.paying(orders);
        return R.success("支付成功~~~");
    }
}
